/*
 * @ClassName SmsRecordService
 * @Description 
 * @version 1.0
 * @Date 2024-06-17 15:33:37
 */
package com.taoge.biz.persistent.service;

import com.taoge.biz.common.enums.SmsActionType;
import com.taoge.biz.persistent.dao.SmsRecordMapper;
import com.taoge.biz.persistent.entity.SmsRecord;
import com.taoge.framework.service.BaseService;
import org.springframework.stereotype.Service;

@Service
public class SmsRecordService extends BaseService<SmsRecord ,SmsRecordMapper> {

    /**
     * @title: countByMobileInDay
     * @description: 查询当天验证码发送次数
     * @date:   2024-07-01 11:08:14
     * @author: YaoSiCheng
     * @param:  mobile
     * @param:  smsActionType
     * @param:  userId
     * @return: Long
     */
    public Long countByMobileInDay(Long userId, String mobile, SmsActionType smsActionType){
        return getMapper().countByMobileInDay(userId,mobile,smsActionType.name());
    }
}